//
//  UIButton+FCUrlPath.h
//  Pods
//
//  Created by WJC on 2020/12/17.
//

#import <UIKit/UIKit.h>
#import "WJCDefine.h"
#import "UIViewController+runtimeCheck.h"
#import "UIView+WJCBaseXibDeploy.h"
NS_ASSUME_NONNULL_BEGIN

@interface UIButton (FCUrlPath)
    //按钮点击回调
    typedef void (^ButtonActionBlock)(UIButton *button);
    //按钮配置url访问
    typedef void (^requestSuccetionActionBlock)(id obj);
    //按钮配置url访问的区间域名
    @property (nonatomic, strong) NSString *urlPath;
    //返回数据中的class数据转换若多层则用,隔开
    @property (nonatomic, strong) NSString *requestStrMJClass;
//转换的模型
@property (nonatomic, strong) NSObject *mjClass;
        /// 按钮配置rul访问传值(目前只支持post)
@property (nonatomic,strong) IBInspectable NSDictionary *requestData;
/// 前置展示str,固定配置
@property (nonatomic, strong) IBInspectable NSString *pushController;
/// 后置展示str,固定配置
        /// 是否过滤报错,否是,api请求报错降不在弹窗
    @property (nonatomic,assign) bool filterError;
        /// 拦截request请求(addTargetRequestWithBlock时使用,用于判断传值是否完全是过滤)
    @property (nonatomic,assign) bool stopRequest;
-(void)addTargetWithBlock:(ButtonActionBlock)actionBlock;
-(void)addTargetWithState:(UIControlEvents)state Block:(ButtonActionBlock)actionBlock;
-(void)addTargetRequestWithBlock:(requestSuccetionActionBlock)success;
@end

NS_ASSUME_NONNULL_END
